load("@fbcode//buck2/tests:buck_e2e.bzl", "buck2_e2e_test")

oncall("testing_frameworks")

buck2_e2e_test(
    name = "test_test_inplace",
    srcs = ["test_test_inplace.py"],
    data = "//buck2/tests/targets:isolated_targets",
    test_with_deployed_buck2 = True,
    use_compiled_buck2_client_and_tpx = True,
    deps = ["//buck2/tests/e2e_util:utils"],
)

buck2_e2e_test(
    name = "test_test_artifacts",
    srcs = ["test_test_artifacts.py"],
    compatible_with = ["ovr_config//os:linux"],
    env = {
        "TESTX_BIN": "$(exe_target fbsource//xplat/tools:testx)",
    },
    skip_for_os = [
        "darwin",
        "windows",
    ],
    test_with_deployed_buck2 = True,
    use_compiled_buck2_client_and_tpx = True,
    deps = [
        "//buck2/tests/e2e_util:utils",
        "//remote_execution/client_lib/wrappers/python:py_re_client_lib",
        "//remote_execution/lib/if:common-py3-types",
        "//remote_execution/lib/if:common-python-types",
        "//remote_execution/lib/if/client_lib:re-client-lib-if-py3-types",
        "//tae/testx:py",
    ],
)

buck2_e2e_test(
    name = "test_testname_formatting",
    srcs = ["test_testname_formatting.py"],
    compatible_with = ["ovr_config//os:linux"],
    skip_for_os = [
        "darwin",
        "windows",
    ],
    test_with_deployed_buck2 = True,
    use_compiled_buck2_client_and_tpx = True,
    deps = [
        "//remote_execution/client_lib/wrappers/python:py_re_client_lib",  # @autodeps2-fixme-manual
    ],
)

buck2_e2e_test(
    name = "test_test_remote_execution",
    srcs = ["test_test_remote_execution.py"],
    data = "//buck2/tests/targets:isolated_targets",
    test_with_deployed_buck2 = False,
    use_compiled_buck2_client_and_tpx = True,
)

buck2_e2e_test(
    name = "test_configs",
    srcs = ["test_configs.py"],
    skip_for_os = [
        "darwin",
        "windows",
    ],
    test_with_deployed_buck2 = False,
    use_compiled_buck2_client_and_tpx = True,
    deps = [
        "//buck2/tests/e2e_util:utilities",
        "//buck2/tests/e2e_util/api:api",
    ],
)
